<!--
 * @Description: 
 * @Author: charles
 * @Date: 2020-11-03 14:05:02
 * @LastEditors: charles
 * @LastEditTime: 2021-08-01 14:07:59
-->
<template>
  <div>
    <h1>{{ article.title }}</h1>
    <div class="listcontent">
      <p v-html="article.content"></p>
    </div>
  </div>
</template>
<script>
import { get } from "../utils/request";
export default {
  data() {
    return {
      id: 0,
      article: "",
    };
  },
  created() {
    this.id = this.$route.query.id;
    this.findById();
  },
  methods: {
    //  this.param.id = this.data.id;
    findById() {
      let url = "index/article/findById";
      get(url, { id: this.id }).then((res) => {
        this.article = res.data;
      });
    },
  },
};
</script>
<style lang="scss">
h1 {
  text-align: center;
}
.listcontent {
  width: 65%;
  margin: 0 auto;
}
</style>